**************************
*** Study 2 - Analyses ***
**************************

* setting directory
cd "~/dropbox/Moral decoupling/Study 2 - US - July-August 2020"

* load data
use "Study_2_data.dta", clear

****************************
** Descriptive statistics **
****************************

sum age
tab gender
tab education /*53.0% completed an academic degree (+18.4% who completed some college)*/

gen non_hisp_white=1 if ethnicity==1 & hispanic==1
recode non_hisp_white(.=0)
tab non_hisp_white /*71.5% are non-Hispanic White*/

tab partisan_group 


*** Overall ***
tab DV, miss
tab relevance, miss
sum DV relevance

*** In the Trump/Biden conditions ***
sum DV relevance if condition_trump==1
sum DV relevance if condition_trump==0


***************************
*** The Trump condition ***
***************************
** Overall difference b/w Democrats and Republicans **
ttest DV if condition_trump==1, by (republican2)
esize twosample DV if condition_trump==1, by (republican2) /* Cohen d = 0.71 */

* with non-partisans
oneway DV partisan_group if condition_trump==1, t sch

* Relevance evaluations
ttest relevance if condition_trump==1, by (republican2)
esize twosample relevance if condition_trump==1, by (republican2) /* Cohen d = 0.84 */ 
* with non-partisans
oneway relevance partisan_group if condition_trump==1, t sch


***************************
*** The Biden condition ***
***************************
** Overall difference b/w Democrats and Republicans **
ttest DV if condition_trump==0, by (republican2)
esize twosample DV if condition_trump==0, by (republican2) /* Cohen d = 0.28 */
* with non-partisans
oneway DV partisan_group if condition_trump==0, t sch


* Relevance evaluations
ttest relevance if condition_trump==0, by (republican2)
esize twosample relevance if condition_trump==0, by (republican2) /* Cohen d = 0.52 */
* with non-partisans
oneway relevance partisan_group if condition_trump==0, t sch


***********************************
*** The two conditions combined ***
***********************************

** Overall difference b/w Democrats and Republicans **
gen party_match=1 if republican2==1 & condition_trump==1
replace party_match=1 if republican2==0 & condition_trump==0
replace party_match=0 if republican2==1 & condition_trump==0
replace party_match=0 if republican2==0 & condition_trump==1
label var party_match "Party match"
label define match_lab 0 "Out-partisans" 1 "Co-partisans"
label values party_match match_lab
tab party_match

ttest DV, by (party_match)
esize twosample DV, by (party_match) /* Cohen d = 0.48 */

* Relevance evaluations
ttest relevance, by (party_match)
esize twosample relevance, by (party_match) /* Cohen d = 0.68 */



********************************************
*** Main Analyses - Experimental results ***
********************************************

*** Table 2 - Main analyses ***

* Table 2 - Model 1 - Among co-partisans in both conditions
reg DV treatment if party_match==1, r
outreg2 using Table_2.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Table 2 - Model 2 - Among out-partisans in both conditions
reg DV treatment if party_match==0, r
outreg2 using Table_2.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Table 2 - Model 3 - Among both co-partisans and out-partisans in both conditions
reg DV i.treatment##i.party_match, r
outreg2 using Table_2.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reduction of the partisan gap:
di  .2444091/1.144936   /* A reduction of 21.3%*/

* Retrodesign Power estimate
retrodesign .2444091, alpha (0.05) se(.2027432) df(1779)


** Figure 2 **
cibar DV, over1(treatment) over2(party_match) level(95) barcol(black gs14) graphopts(ylabel(,) graphregion(color(white)) ytitle("Inappropriateness of transgression")) 





************************
*** Robustness tests ***
************************

** Table A4 - The separate results in the Trump Biden conditions **

*** The Trump condition ***
** Table A4, Model 1 - Among co-partisans (Republicans)
reg DV treatment if republican2==1 & condition_trump==1, r
outreg2 using Table_A4.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Table 2, Model 2 - Among out-partisans (Democrats)
reg DV treatment if republican2==0 & condition_trump==1, r
outreg2 using Table_A4.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Table 2, Model 3 - Combined analysis
reg DV i.republican2##i.treatment if condition_trump==1, r
outreg2 using Table_A4.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reduction of the partisan gap:
di .2874732/1.577578 /* A reduction of 18.2%*/

*** The Biden condition ***
* Table A4, Model 4 - Among co-partisans (Democrats)
reg DV treatment if republican2==0 & condition_trump==0, r
outreg2 using Table_A4.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Table A4, Model 5 - Among out-partisans (Republicans)
reg DV treatment if republican2==1 & condition_trump==0, r
outreg2 using Table_A4.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Table A4, Model 6 - Combined analysis
gen dem=1-republican2
reg DV i.dem##i.treatment if condition_trump==0, r
outreg2 using Table_A4.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reduction of the partisan gap:
di  .1936494/.7200913   /* A reduction of 26.9%*/



** Table A5 - Treating "don't know" responses as mid-point **
gen DV_w_DK=DV
recode DV_w_DK (.=4)

* Model 1 - Among co-partisans (Republicans) in the Trump condition
reg DV_w_DK treatment if republican2==1 & condition_trump==1, r
outreg2 using Table_A5.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 2 - Among out-partisans (Democrats) in the Trump condition
reg DV_w_DK treatment if republican2==0 & condition_trump==1, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 3 - Combined analysis in the Trump condition
reg DV_w_DK i.republican2##i.treatment if condition_trump==1, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Model 4 - Among co-partisans (Democrats) in the Bןiden condition
reg DV_w_DK treatment if republican2==0 & condition_trump==0, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 5 - Among out-partisans (Republicans) in the Bןiden condition
reg DV_w_DK treatment if republican2==1 & condition_trump==0, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 6 - Combined analysis in the Bןiden condition
reg DV_w_DK i.dem##i.treatment if condition_trump==0, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Model 7 - Among co-partisans in both conditions
reg DV_w_DK treatment if party_match==1, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 8 - Among out-partisans in both conditions
reg DV_w_DK treatment if party_match==0, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 9 - Among both co-partisans and out-partisans in both conditions
reg DV_w_DK i.treatment##i.party_match, r
outreg2 using Table_A5.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 
	
* Reduction of the partisan gap:
di  .242733/1.125385   /* A reduction of 21.6%*/

* Retrodesign Power estimate
retrodesign .242733, alpha (0.05) se(.1973175) df(1832)




** Table A6 - Dropping the quickest 5% of respondents (105 seconds) **
sum time, d

* Model 1 - Among co-partisans (Republicans) in the Trump condition
reg DV treatment if republican2==1 & condition_trump==1 & time>105, r
outreg2 using Table_A6.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 2 - Among out-partisans (Democrats) in the Trump condition
reg DV treatment if republican2==0 & condition_trump==1 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 3 - Combined analysis in the Trump condition
reg DV i.republican2##i.treatment if condition_trump==1 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Model 4 - Among co-partisans (Democrats) in the Biden condition
reg DV treatment if republican2==0 & condition_trump==0 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 5 - Among out-partisans (Republicans) in the Biden condition
reg DV treatment if republican2==1 & condition_trump==0 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 6 - Combined analysis in the Biden condition
reg DV i.dem##i.treatment if condition_trump==0 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Model 7 - Among co-partisans in both conditions
reg DV treatment if party_match==1 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 8 - Among out-partisans in both conditions
reg DV treatment if party_match==0 & time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 9 - Among both co-partisans and out-partisans in both conditions
reg DV i.treatment##i.party_match if time>105, r
outreg2 using Table_A6.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reduction of the partisan gap:
di .2882143/1.197212   /* A reduction of 24.1%*/

* Retrodesign Power estimate
retrodesign  .2882143, alpha (0.05) se(.2038733) df(1704)



** Table A7 - Dropping the quickest 10% of respondents (131 seconds) **

* Model 1 - Among co-partisans (Republicans) in the Trump condition
reg DV treatment if republican2==1 & condition_trump==1 & time>131, r
outreg2 using Table_A7.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 2 - Among out-partisans (Democrats) in the Trump condition
reg DV treatment if republican2==0 & condition_trump==1 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 3 - Combined analysis in the Trump condition
reg DV i.republican2##i.treatment if condition_trump==1 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


** Model 4 - Among co-partisans (Democrats) in the Biden condition
reg DV treatment if republican2==0 & condition_trump==0 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 5 - Among out-partisans (Republicans) in the Biden condition
reg DV treatment if republican2==1 & condition_trump==0 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

** Model 6 - Combined analysis in the Biden condition
reg DV i.dem##i.treatment if condition_trump==0 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Model 7 - Among co-partisans in both conditions
reg DV treatment if party_match==1 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 8 - Among out-partisans in both conditions
reg DV treatment if party_match==0 & time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 9 - Among both co-partisans and out-partisans in both conditions
reg DV i.treatment##i.party_match if time>131, r
outreg2 using Table_A7.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reduction of the partisan gap:
di  .2471247 /1.188161    /* A reduction of 20.8%*/

* Retrodesign Power estimate
retrodesign .2471247, alpha (0.05) se(.2069074) df(1621)




*******************
** Balance tests **
*******************
** Not mentioned in the main text/Online Resource
ttest age, by (treatment) /* p=.038*/
ttest time, by (treatment) /* p=.182*/

tab gender treatment, chi col /* p=.677*/
tab non_hisp_white treatment, chi col /* p=.260*/
tab education treatment, chi col /* p=.880*/
tab partisan_group treatment, chi col /* p=.938*/
tab republican2 treatment, chi col /* p=.729*/

logit treatment age gender non_hisp_white i.education, r  /* p=.574*/
logit treatment age gender non_hisp_white i.education i.partisan_group, r  /* p=.703*/
logit treatment age gender non_hisp_white i.education republican2, r  /* p=.785*/

drop non_hisp_white 
